#define _CRT_SECURE_NO_WARNINGS	

int func(int n)
{
    int a = n % 10;
    int b = n / 100;
    int c = n / 10 % 10;
    if (a + b == c)
        return 1;
    return 0;
}